﻿
@using TagHelperSample.Web.Models
@model User

<h2>Edit</h2>

<form>
    <div class="form-horizontal">
        <div asp-validation-summary="All"></div>
        <input type="hidden" asp-for="Id" />

        <div class="form-group">
            <label asp-for="Name" class="control-label col-md-2"></label>
            <div class="col-md-10">
                <input type="text" asp-for="Name" />
                <span validation-for="Name"></span>
            </div>
        </div>
        <div class="form-group">
            <label asp-for="DateOfBirth" class="control-label col-md-2"></label>
            <div class="col-md-10">
                <input type="date" asp-for="DateOfBirth" asp-format="{0:yyyy-MM-dd}" />
                <span asp-validation-for="DateOfBirth"></span>
            </div>
        </div>
        <div class="form-group">
            <label asp-for="YearsEmployeed" class="control-label col-md-2"></label>
            <div class="col-md-10">
                <select asp-for="YearsEmployeed" asp-items="(IEnumerable<SelectListItem>)ViewBag.Items" size="2" class="form-control">
                    <optgroup label="Newby">
                        <option value="0">Less than 1</option>
                        <option value="1">1</option>
                    </optgroup>
                    <option value="2">2</option>
                    <option value="3">3</option>
                    <option value="4">4</option>
                    <option value="5">5</option>
                    <option value="6">6</option>
                </select>
                <span asp-validation-for="YearsEmployeed"></span>
            </div>
        </div>
        <div class="form-group">
            <label asp-for="Blurb" class="control-label col-md-2"></label>
            <div class="col-md-10">
                <textarea rows="4" asp-for="Blurb"></textarea>
                <span asp-validation-for="Blurb"></span>
            </div>
        </div>

        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                <input type="submit" value="Save" class="btn btn-default" />
            </div>
        </div>
    </div>
</form>

<div>
    <a asp-action="Index">Back to list</a>
</div>
